package com.cndym.adapterForMobile;

import com.cndym.exception.ErrCode;

import java.util.HashMap;
import java.util.Map;

/**
 * Description:
 * Author:cndym
 * Time:2013-01-05 10:37
 */
public class BaseMobileAdapter implements IMobileAdapter {
    @Override
    public Map<String, String> execute(Map<String, String> paraMap) {
        return null;
    }

    public Map<String, String> funcErr() {
        return noBodyReMap(ErrCode.E3003);
    }

    public Map<String, String> noBodyReMap(String errCode) {
        Map<String, String> reMap = new HashMap<String, String>();
        reMap.put("code", errCode);
        reMap.put("msg", ErrCode.codeToMsg(errCode));
        return reMap;
    }

    public Map<String, String> noBodyReMap(String errCode, Map<String, String> paraMap) {
        Map<String, String> reMap = new HashMap<String, String>();
        reMap.put("code", errCode);
        reMap.put("msg", ErrCode.codeToMsg(errCode));
        reMap.putAll(paraMap);
        return reMap;
    }
}
